<?php

namespace App\Kuafu\User\Controller\Internal;

use App\Exceptions\BaseException;
use App\Kuafu\Base\Controller\BaseController;
use App\Kuafu\Base\Enum\BaseCodeEnum;
use App\Kuafu\Shop\Model\Shop;
use App\Kuafu\User\Enum\CodeEnum;
use App\Kuafu\User\Enum\UserCodeEnum;
use App\Kuafu\User\Model\User;
use App\Kuafu\User\Service\AuthService;
use App\Kuafu\User\Service\FsUserService;
use App\Kuafu\User\Service\UserRoleService;
use App\Kuafu\User\Service\UserService;
use App\Kuafu\User\Validate\UserValidate;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class FsUserController extends BaseController
{
    public function getUserLists(Request $request)
    {
        $departmentName   = (string)$request->get('departmentName');
        $rootDepartmentId = (string)$request->get('rootDepartmentId');
        $fields           = $request->get('fields', ['*']);

        return $this->success(['lists' => FsUserService::lists($departmentName, $rootDepartmentId, $fields)]);
    }
}
